package Array;

/**
 * 27.移除元素
 * <a>https://leetcode.cn/problems/remove-element/description/</a>
 */
public class G027 {
    public int removeElement(int[] nums, int val) {

        int slow =0;
        for (int fast =0 ;fast<nums.length;fast++){
            if (nums[fast]!=val){
                nums[slow]=nums[fast];
                slow++;
            }
        }
        return slow;
    }
}
